package yahoo.test;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;

public class yahoo {
	public WebDriver driver = new FirefoxDriver();
	@Test
  public void yahooMainpage() {
		driver.get("http://www.yahoo.com");
		WebElement WebsiteSearch = driver.findElement(By.id("p_13838465-p"));
		WebsiteSearch.sendKeys("Selenium");
		WebElement searchOption = driver.findElement(By.id("search-submit"));
		searchOption.click();
		
  }
  @BeforeTest
  public void beforeTest() {
  }

  @AfterTest
  public void afterTest() {
	 // driver.close();
  }

}
